package com.quikin.persistence.jpa.test;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;


/**
 * The persistent class for the EMPLOYEE_CREDENTIAL database table.
 * 
 */
@Entity
@Table(name="EMPLOYEE_CREDENTIAL")
public class EmployeeCredential implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private EmployeeCredentialPK id;

	@Column(name="COMPANY_UUID")
	private String companyUuid;

	@Column(name="LAST_LOGIN_TIME")
	private Timestamp lastLoginTime;

	@Column(name="LOGIN_ID")
	private String loginId;

	private String password;

	@Column(name="PWD_CHANG_TIME")
	private Timestamp pwdChangTime;

	//bi-directional one-to-one association to Employee
	@OneToOne
	@JoinColumns({
		@JoinColumn(name="COMPANY_ID", referencedColumnName="COMPANY_ID"),
		@JoinColumn(name="EMPLOYEE_ID", referencedColumnName="ID")
		})
	private Employee employee;

    public EmployeeCredential() {
    }

	public EmployeeCredentialPK getId() {
		return this.id;
	}

	public void setId(EmployeeCredentialPK id) {
		this.id = id;
	}
	
	public String getCompanyUuid() {
		return this.companyUuid;
	}

	public void setCompanyUuid(String companyUuid) {
		this.companyUuid = companyUuid;
	}

	public Timestamp getLastLoginTime() {
		return this.lastLoginTime;
	}

	public void setLastLoginTime(Timestamp lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLoginId() {
		return this.loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Timestamp getPwdChangTime() {
		return this.pwdChangTime;
	}

	public void setPwdChangTime(Timestamp pwdChangTime) {
		this.pwdChangTime = pwdChangTime;
	}

	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	
}